﻿<%@ Page Title="ASP.NET Fundation" Language="C#" AutoEventWireup="true"  MasterPageFile="~/Site.master" 
    CodeBehind="aspNetBase.aspx.cs" Inherits="WebApplication.aspNetBase" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <div  style="width:100%; float:left; border-width:thin">
        <h3 style=" width:100%; background-color: #b6b7bc">Delegates</h3>
        <label>Choose The Method and Input two numbers to caculate</label>
        <asp:RadioButtonList ID="RadBtnListCalculateMethod" runat="server"  RepeatDirection="Horizontal">  
            <asp:ListItem>Plus</asp:ListItem>
            <asp:ListItem>Subtract</asp:ListItem>
        </asp:RadioButtonList></br>
        input number1: <asp:TextBox ID="TxtBoxNum1" runat="server"></asp:TextBox></br>          
        input number2: <asp:TextBox ID="TxtBoxNum2" runat="server"></asp:TextBox></br>
        <asp:Button ID="BtnCalculate" runat="server" Text="Calculate" 
            onclick="BtnGetResult_OnClick"></asp:Button>
        <asp:Label ID="lblCalculateResult" runat="server"></asp:Label>

    </div>
    <div  style="width:100%; float:left; border-width:thin">
        <h3 style=" width:100%;background-color: #b6b7bc ">Accessibility Keywords</h3>
        <table>
            <tr>
                <td>Keyword</td> 
                <td>Accessibility</td> 
            </tr>
            <tr>
                <td>public  </td>
                <td>Can be accessed by any class</td> 
            </tr>
            <tr>    
                <td>private </td>
                <td>Can be accessed only by members inside the current class</td> 
            </tr>
            <tr>
                <td>internal</td>
                <td>Can be accessed by members in any of the classes in the current assembly (the file with the compiled code) </td>
            </tr>
            <tr>
                <td>protected</td>
                <td>Can be accessed by members in the current class or in any class that inherits from this class</td> 
            </tr>
            <tr>
                <td>protected internal</td>
                <td>Can be accessed by members in the current application (as with internal) and  by the members in any class that inherits from this class</td> 
            </tr>
        </table>
    </div>
    <div style="width:100%; float:left; border-width:thin">
         <h3 style=" width:100%;background-color: #b6b7bc ">Class Practice</h3>
         <table>
            <tr>
                <td style=" background-color:#b6b7bc">
                    <asp:Label ID="lblProduct1Name" runat = "server" style="width:300px;height:20px"></asp:Label>
                </td>
                <td>
                    <asp:Label ID="lblProduct1Price" runat = "server" style="width:50px;"></asp:Label>
                </td>
            </tr>
            <tr>
               <td style=" background-color:#b6b7bc">
                    <asp:Label ID="lblProduct2Name" runat = "server" style="height:20px"></asp:Label>
                </td>
                <td>
                    <asp:Label ID="lblProduct2Price" runat = "server"></asp:Label>
                </td>
            </tr>
         </table></br>
         <div style="width:100%; float:left; border-width:thin">
         <h3 style="width:100%; background-color: #b6b7bc">Reference to Class Object</h3>
            <a> Product theProduct = new TaxableProduct(...);</a></br> 
            <a> TaxableProduct theTaxableProduct = theProduct as TaxableProduct; </a></br> 
            <a> if (theTaxableProduct != null) </a></br> 
            <a> { </a></br> 
            <a>     // (It's safe to use the object.) </a></br> 
            <a> } </a></br> 
            <a> else </a></br> 
            <a> { </a></br> 
            <a>     // (Either the conversion failed or theTaxableProduct was null to begin with.) </a></br> 
            <a> }</a></br>    
         </div>  
    </div>
    <div style="width:100%; float:left; border-width:thin">
    <h3 style="width:100%; background-color: #b6b7bc ">Iframe Example</h3>
        <iframe src="http://www.w3schools.com/" width="100%" height="300px" ></iframe>
    </div>

</asp:Content>
